package com.king.springcloud.controller;

import com.king.springcloud.domain.CommonResult;
import com.king.springcloud.service.StorageService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author king
 * @date 2020/10/21 0:10
 */
@RestController
public class StorageController {

    @Resource
    private StorageService storageService;

    @RequestMapping("/storage/decrease")
    public CommonResult decrease(Long productId, Integer count) {
        return storageService.decrease(productId, count);
    }
}
